<?php

namespace App\Http\Controllers\Api;

use App\Http\Controllers\BaseController;
use Illuminate\Http\Request;

class IndustryController extends BaseController
{
    public $validate = [
        "getList" => ["rules" => [
        ]],
    ];

    /**
     * @path /industry/list
     * @category 行业
     * @title 列表
     * @method POST
     * @resBody {"message":"操作成功","statusCode":200,"success":true,"result":[{"id":1,"parent_id":0,"name":"计算机/互联网/通信/电子","level":1,"child":[{"id":2,"parent_id":1,"name":"计算机软件","level":2}]}]}
     */
    public function getList(Request $request)
    {
        $data = service()->IndustryService->getList();

        return $this->apiReturn($data);
    }
}
